import { generateRandomId } from '@/utils';

export const editConfig: PageConfig = {
    items: [
        {
            itemType: 'text',
            modelKey: 'equipmentNumber',
            elInputProps: {
                placeholder: '请输入设备编码',
                disabled: true
            },
            columnProps: {
                label: '设备编码'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'text',
            modelKey: 'deviceName',
            elInputNumberProps: {
                placeholder: '请输入设备名称'
            },
            columnProps: {
                label: '设备名称'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'text',
            modelKey: 'deviceType',
            elInputNumberProps: {
                placeholder: '请输入设备类型'
            },
            columnProps: {
                label: '设备类型'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            itemType: 'select',
            modelKey: 'equipmentStatus',
            elSelectProps: {
                placeholder: '请选择状态',
                options: [
                    { value: 'USING', label: '使用中' },
                    { value: 'IDLE', label: '空闲' },
                    { value: 'IDLE_SCRAP', label: '维修中' },
                    { value: 'SCRAP', label: '报废' }
                ]
            },
            columnProps: {
                label: '设备状态'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        },
        {
            modelKey: 'workshop',
            slotName: 'workshop',
            columnProps: {
                label: '所属车间'
            },
            elInputProps: {
                placeholder: '请选择所属车间'
            },
            validProps: {
                id: generateRandomId(),
                required: true
            }
        }
    ]
};
